package zhr.chapter12;

public class Producer extends Thread {
    private int produceNum;
    private BreadContainer bc;

    public Producer(int produceNum, BreadContainer bc, String producerName) {
        this.produceNum = produceNum;
        this.bc = bc;
        this.setName(producerName);
    }

    public Producer() {
    }

    public void run() {
        bc.produceBread(produceNum, this.getName());
    }

}
